import request from "@/utils/request";
//查询套餐列表
// export const getPackCombinelist = (current, size, content, bundStyle) => {
//   return request({
//     url: `/quote/budget/ysPackageCombine/searchPackCombinePage?current=${current}&size=${size}&content=${content}&bundStyle=${bundStyle}`,
//     method: "get"
//   });
// };
export const getPackCombinelist = props => {
  return request({
    url: "/quote/budget/ysPackageCombine/searchPackCombinePage",
    method: "get",
    params: props
  });
};
//.根据模板id查询预算模板
export const gettemplateById = templateId => {
  return request({
    url: `/quote/budget/quotation/getTemplateById/${templateId}`,
    method: "get"
  });
};
export const getTemplateByCombine = combineId => {
  return request({
    url: `/quote/budget/quotation/getTemplateByCombine/${combineId}`,
    method: "get"
  });
};

//.定额商品信息获取(字段是商品page页面一样的字段)
export const getQuotaProductVOList = (quotaId, data) => {
  return request({
    url: `/quote/quotaProduct/getQuotaProductVOList/${quotaId}`,
    method: "post",
    data
  });
};

export const spaceQueryUpdateName = props => {
  return request({
    url: "/quote/budget/quotation/SpaceQueryUpdateName",
    method: "post",
    data: props
  });
};

export const quotaProductConditionList = (quotaId, data) => {
  return request({
    url: `/quote/quotaProductCondition/quotaProductConditionList/${quotaId}?productType=${data}`,
    method: "get"
  });
};
//查询套餐关联的预算报价
export const selectbudgetbytem = props => {
  return request({
    url: "/quote/budget/quotation/queryRelatedBudgetQuotationTemplateList",
    method: "post",
    data: props
  });
};
//导入报价模板
export const importBudget = props => {
  return request({
    url: "/quote/budget/quotation/packageImportBudgetQuotation",
    method: "post",
    data: props
  });
};

export const getCustomerListWithSort = (search, templateId, combineId) => {
  return request({
    url: `/quote/budget/quotation/getCustomerListWithSort?search=${search}&templateId=${templateId}&combineId=${combineId}`,
    method: "get"
  });
};

// 缓存填写的备注
export const saveTempCustomerRemark = props => {
  return request({
    url: "/quote/shop/query/saveTempCustomerRemark",
    method: "post",
    data: props
  });
};
